import request from "@/utils/request";

export function createOrEdit(data) {
  return request({
    url: '/photo/createOrEdit',
    method: 'post',
    data
  })
}

export function deletePhoto(data) {
  return request({
    url: '/photo/delete',
    method: 'post',
    data
  })
}

export function getList(page, size, name) {
  return request({
    url: '/photo/list',
    method: 'get',
    params: {page, size, name}
  })
}

export function findByIdPhoto(id) {
  return request({
    url: '/photo/findById',
    method: 'get',
    params: {id}
  })
}
// 图文统计列表
export function statList(params) {
  return request({
    url: '/photo/pageView',
    method: 'get',
    params
  })
}
// 图文单个销售统计
export function statInfo(params) {
  return request({
    url: '/photo/info',
    method: 'get',
    params
  })
}
// 图文停留时间
export function statLists(params) {
  return request({
    url: '/photo/visitTime',
    method: 'get',
    params
  })
}
